package com.jiangyao.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jiangyao.common.annotation.Cache;
import com.jiangyao.dao.IRoleDao;
import com.jiangyao.model.entity.Role;
import com.jiangyao.service.RoleService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 角色 服务实现类
 * </p>
 *
 * @author yangyongchuan
 * @since 2020-08-12
 */
@Service
public class RoleServiceImpl extends ServiceImpl<IRoleDao, Role> implements RoleService {

	@Cache
	@Override
	public List<Role> getValidList() {
		QueryWrapper<Role> queryWrapper = new QueryWrapper<>();
		queryWrapper.eq("status", 1);
		return this.list(queryWrapper);
	}
}
